var app = angular.module('fiveApp');
app.controller('articleCtr', ['$rootScope', '$scope', 'ajaxService','$stateParams', function ($rootScope, $scope, ajax,$stateParams) {

        $scope.data = {
            article:{}
        };

    $scope.$on('$stateChangeSuccess', function () {
        ajax('indexInfo',{id:$stateParams.query},function (res){
            if(!res.errCode){
                $scope.data.article = res.data
            }
        })
    })
    }
])